<template>
  <div>
    <el-tabs v-model="activeName" type="card" @tab-click="handleClick" size="small">
      <el-tab-pane label="每日交易" name="trDetails">
        <GpBaseTable   primary-key="id" :columns="trDetailsColumns"
                       ref="trDetailsTable"
                       :form-data="formData"
                       url="/xcdhTrading/day-transaction-data/v2/listByPage"
                       sync-data-url="/xcdhTrading/day-transaction-data/syncTransactionData">
        </GpBaseTable>
      </el-tab-pane>
      <el-tab-pane label="涨停板" name="first">
        <GpBaseTable ref="gpBaseTable" primary-key="id" :columns="columns"
                     :url="url" :params="params"
                     :form-data="formData"
                     sync-data-url="/xcdhTrading/stock-info/downLoadAStock">
<!--          <template #toolbarBefore>-->
<!--            <el-button type="danger" size="small" class="dis-lb"  @click="lookHotMoney">跟踪游资</el-button>-->
<!--            <el-button type="success" size="small" class="dis-lb" @click="lookZhuLi">跟踪主力</el-button>-->
<!--          </template>-->
        </GpBaseTable>
      </el-tab-pane>
      <el-tab-pane label="跌停板" name="LimitDown">
        <GpBaseTable ref="lDBaseTable" primary-key="id" :columns="columns"
                     :url="url" :params="lDParams"
                     :form-data="formData"
                     sync-data-url="/xcdhTrading/stock-info/downLoadAStock">
        </GpBaseTable>
      </el-tab-pane>
      <el-tab-pane label="涨的最好的" name="Good">
        <GpBaseTable ref="GoodBaseTable" primary-key="id" :columns="goodColumns"
                     :url="url" :params="goodParams"
                     :form-data="formData"
                     sync-data-url="/xcdhTrading/stock-info/downLoadAStock">
        </GpBaseTable>
      </el-tab-pane>

      <el-tab-pane label="抓妖" name="highest">
        <GpBaseTable ref="GoodBaseTable" primary-key="id" :columns="highestColumns"
                     :url="url" :params="highestParams"
                     :form-data="formData"
                     sync-data-url="/xcdhTrading/stock-info/downLoadAStock">
        </GpBaseTable>
      </el-tab-pane>

      <el-tab-pane label="选股" name="XG">
        <GpBaseTable ref="XGBaseTable" primary-key="id" :columns="XGColumns"
                     url="/xcdhTrading/day-transaction-data/xGuList"
                     :form-data="formData"
                     sync-data-url="/xcdhTrading/stock-info/downLoadAStock">
        </GpBaseTable>
      </el-tab-pane>

      <el-tab-pane label="游资" name="second" :disabled="true">
        <GpBaseTable   primary-key="id" :columns="hotMoneyColumns"
                       :mounted-load="false"
                       ref="hotMoneyTable"
                       url="/xcdhTrading/hotMoneyTrc/v2/listByPage"
                       :params="getHotMoneyParam"
                       sync-data-url="/xcdhTrading/hotMoneyTrc/syncHotMoneyTrc">
        </GpBaseTable>
      </el-tab-pane>
      <el-tab-pane label="个股资金流向" name="third" :disabled="true">
        <GpBaseTable   primary-key="id" :columns="capitalFlowColumns"
                       :mounted-load="false"
                       ref="capitalFlowTable"
                       url="/xcdhTrading/capitalFlow/v2/listByPage"
                       :params="getHotMoneyParam"
                       sync-data-url="/xcdhTrading/capitalFlow/syncCapitalFlow">
        </GpBaseTable>
      </el-tab-pane>
      <el-tab-pane label="竞价" name="jingJia" :disabled="true">
        <GpBaseTable   primary-key="id" :columns="stockBiddingColumns"
                       :mounted-load="false"
                       ref="stockBiddingTable"
                       :params="getHotMoneyParam"
                       url="/xcdhTrading/stockBidding/v2/listByPage"
                       sync-data-url="/xcdhTrading/stockBidding/syncDayBidding">
        </GpBaseTable>
      </el-tab-pane>
      <el-tab-pane label="历史涨停" name="liShi" :disabled="true">
        <GpBaseTable   primary-key="id" :columns="ztStockColumns"
                       :mounted-load="false"
                       ref="ztStockTable"
                       :params="getHotMoneyParam"
                       url="/xcdhTrading/ztStock/v2/listByPage"
                       sync-data-url="/xcdhTrading/ztStock/syncZtStock">
        </GpBaseTable>
      </el-tab-pane>

    </el-tabs>
  </div>
</template>

<script>
import http from "network/http";

export default {
  name: "golpe" ,
  components:{} ,
  data(){
    return {
      activeName: 'trDetails',
      formData:{tradeDate: ""} ,
      tradeDateCode: '' ,
      url: "/xcdhTrading/stockInfo/v2/listByPage" ,
      tsCodes:[],
      currRow: null ,
      columns:[
        {
          key: 'industry' ,
          title: '行业' ,
          search: true ,
          op: 'LIKE',
          attrs:{
            width: 110
          }
        },
        {
          key: 'name' ,
          title: '股票名称' ,
          search: true ,
          op: 'LIKE',
          attrs:{
            width: 120
          }
        },
        {
          key: 'tradeDate' ,
          title: '交易日期' ,
          search: true ,
          is: "el-date-picker" ,
          attrs:{
            width: 100 ,
            "value-format":"yyyy-MM-dd"
          }

        },
        {
          key: 'showPrice' ,
          title: '股票价格',
          tableIs: "ShowGpPrice"
        },
        {
          key: 'turnoverRate' ,
          title: '换手率',
        },
        {
          key: 'volumeRatio' ,
          title: '量比',
        },
        {
          key: 'nums' ,
          title: '连板数量',
          search: true ,
        },
        {
          key: 'zdfNumStr' ,
          title: '涨/跌><3%'
        },
        {
          key: 'zdNumStr' ,
          title: '涨/跌'
        },
        {
          key: 'hotAmount' ,
          title: '游资成交额',
          tableIs: "BigNumberColumn",
        },
        {
          key: 'bigAmount' ,
          title: '大单成交额',
          tableIs: "BigNumberColumn",
          unit: '万'
        },
        {
          key: 'smallAmount' ,
          title: '小单成交额',
          tableIs: "BigNumberColumn",
          unit: '万'
        },
        {
          key: 'pctChgSum' ,
          title: '涨跌幅汇总' ,
          attrs:{
            width: 120
          }
        },

        {
          key: 'pctChg' ,
          title: '涨跌幅',
          tableIs: "NumberColumn" ,
        },
        {
          key: 'openNum' ,
          title: '开板次数'
        },
        {
          key: 'firstTime' ,
          title: '首次涨停时间' ,
          attrs:{
            width: 120
          }
        },
        {
          key: 'lastTime' ,
          title: '最后涨停时间' ,
          attrs:{
            width: 120
          }
        },
        {
          key: 'fdAmount' ,
          title: '封单金额',
          tableIs: "BigNumberColumn" ,
          attrs:{
            width: 120
          }
        },
        {
          title: '操作' ,
          type: 'action',
          attrs:{
            width: 290
          },
          buttons: [
            {
              is: 'el-button' ,
              title: '跟踪游资',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.activeName = "second" ;
                this.currRow = row
                this.tsCodes = [row.tsCode]
                this.$nextTick(()=>{
                  this.$refs.hotMoneyTable.handlerQueryListByPage(
                      [
                          {
                            key: 'tsCode' ,
                            op: 'EQ',
                            value: row.tsCode
                          },
                        {
                          key: 'tradeDate' ,
                          op: 'EQ',
                          value: this.tradeDateCode
                        }
                      ]
                  )
                })
              }
            },
            {
              is: 'el-button' ,
              title: '跟踪主力',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.activeName = "third" ;
                this.currRow = row
                this.tsCodes = [row.tsCode]
                this.$nextTick(()=>{
                  this.$refs.capitalFlowTable.handlerQueryListByPage(
                      [
                          {
                            key: 'tsCode' ,
                            op: 'EQ',
                            value: row.tsCode
                          },
                        {
                          key: 'tradeDate' ,
                          op: 'EQ',
                          value: this.tradeDateCode
                        }
                      ]
                  )
                })
              }
            },
            {
              is: 'el-button' ,
              title: '竞价',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.activeName = "jingJia" ;
                this.currRow = row
                this.tsCodes = [row.tsCode]
                this.$nextTick(()=>{
                  this.$refs.stockBiddingTable.handlerQueryListByPage(
                      [
                          {
                            key: 'tsCode' ,
                            op: 'EQ',
                            value: row.tsCode
                          },
                          {
                            key: 'tradeDate' ,
                            op: 'EQ',
                            value: this.tradeDateCode
                          }
                      ]
                  )
                })
              }
            },
            {
              is: 'el-button' ,
              title: '历史涨停',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.currRow = row
                this.activeName = "liShi" ;
                this.tsCodes = [row.tsCode]
                this.$nextTick(()=>{
                  this.$refs.ztStockTable.handlerQueryListByPage(
                      [
                        {
                          key: 'tsCode' ,
                          op: 'EQ',
                          value: row.tsCode
                        }
                      ]
                  )
                })
              }
            },
            {
              is: 'el-button' ,
              title: '交易明细',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.activeName = "trDetails" ;
                this.currRow = row
                this.tsCodes = [row.tsCode]
                this.$nextTick(()=>{
                  this.$refs.trDetailsTable.handlerQueryListByPage(
                      [
                        {
                          key: 'tsCode' ,
                          op: 'EQ',
                          value: row.tsCode
                        }
                      ]
                  )
                })
              }
            },
          ]
        }
      ] ,
      hotMoneyColumns: [
        {
          "title": "交易日期",
          "key": "tradeDate",
          is: "el-date-picker" ,
          search: true ,
          attrs:{
            "value-format":"yyyyMMdd"
          }
        },
        {
          "title": "股票名称",
          op: 'LIKE' ,
          "key": "tsName"
        },
        {
          "title": "股票价格",
          "key": "price"
        },
        {
          "title": "股票涨幅",
          "key": "pctChg"
        },
        {
          "title": "买入金额（元）",
          "key": "buyAmount",
          tableIs: "BigNumberColumn" ,
        },
        {
          "title": "卖出金额（元）",
          "key": "sellAmountAbs",
          tableIs: "BigNumberColumn" ,
        },
        {
          "title": "净买卖（元）",
          "key": "netAmount",
          tableIs: "BigNumberColumn" ,
        },
        {
          "title": "游资名称",
          "key": "hmName"
        },
        {
          title: '操作' ,
          type: 'action',
          attrs:{
            width: 230
          },
          buttons: [
            {
              is: 'el-button' ,
              title: '跟踪主力',
              attrs: {
                type: 'text'
              },
              click:()=>{
                this.toTrade('capitalFlowTable' , "third")
              }
            },
            {
              is: 'el-button' ,
              title: '竞价',
              attrs: {
                type: 'text'
              },
              click:()=>{
                this.toTrade('stockBiddingTable' , "jingJia")
              }
            },
            {
              is: 'el-button' ,
              title: '历史涨停',
              attrs: {
                type: 'text'
              },
              click:()=>{
                this.toTrade('ztStockTable' , "liShi")
              }
            },
            {
              is: 'el-button' ,
              title: '交易明细',
              attrs: {
                type: 'text'
              },
              click:()=>{
                this.toTrade('trDetailsTable' , "trDetails")
              }
            },
          ]
        }
      ],
      capitalFlowColumns:[
        {
          "title": "交易日期",
          "key": "tradeDate",
          is: "el-date-picker" ,
          attrs:{
            "value-format":"yyyyMMdd"
          }
        },
        {
          "title": "股票名称",
          "key": "name"
        },
        {
          "title": "涨跌幅",
          "key": "pctChange",
          tableIs: "NumberColumn" ,
        },
        {
          key: 'showPrice' ,
          title: '股票价格',
          tableIs: "ShowGpPrice"
        },
        {
          key: 'totalAmount',
          "title": "总净额",
          tableIs: "BigNumberColumn" ,
          unit: '万'
        },
        {
          "title": "主力净流入额",
          "key": "netAmount",
          tableIs: "BigNumberColumn" ,
          unit: '万'
        },
        {
          "title": "超大单净流入额",
          "key": "buyElgAmount",
          tableIs: "BigNumberColumn" ,
          unit: '万'
        },
        {
          "title": "大单净流入额",
          "key": "buyLgAmount",
          tableIs: "BigNumberColumn" ,
          unit: '万'
        },
        {
          "title": "中单净流入额",
          "key": "buyMdAmount",
          tableIs: "BigNumberColumn" ,
          unit: '万'
        },
        {
          "title": "小单净流入额",
          "key": "buySmAmount",
          tableIs: "BigNumberColumn" ,
          unit: '万'
        },
        {
          title: '操作' ,
          type: 'action',
          attrs:{
            width: 230
          },
          buttons: [
            {
              is: 'el-button' ,
              title: '跟踪游资',
              attrs: {
                type: 'text'
              },
              click:()=>{
                this.toTrade('hotMoneyTable' , "second")
              }
            },
            {
              is: 'el-button' ,
              title: '竞价',
              attrs: {
                type: 'text'
              },
              click:()=>{
                this.toTrade('stockBiddingTable' , "jingJia")
              }
            },
            {
              is: 'el-button' ,
              title: '历史涨停',
              attrs: {
                type: 'text'
              },
              click:()=>{
                this.toTrade('ztStockTable' , "liShi")
              }
            },
            {
              is: 'el-button' ,
              title: '交易明细',
              attrs: {
                type: 'text'
              },
              click:()=>{
                this.toTrade('trDetailsTable' , "trDetails")
              }
            },
          ]
        }
      ],
      stockBiddingColumns:[
        {
          "title": "数据日期",
          "key": "tradeDate",
          is: "el-date-picker" ,
          attrs:{
            width: 100 ,
            "value-format":"yyyyMMdd"
          }

        },
        {
          "title": "股票名称",
          "key": "name",
        },
        {
          "title": "成交量（股）",
          "key": "vol"
        },
        {
          "title": "成交均价（元）",
          "key": "price"
        },
        {
          "title": "成交金额（元）",
          "key": "amount"
        },
        {
          "title": "昨收价（元）",
          "key": "preClose"
        },
        {
          "title": "换手率（%）",
          "key": "turnoverRate"
        },
        {
          "title": "量比",
          "key": "volumeRatio"
        },
        {
          "title": "流通股本（万股）",
          "key": "floatShare"
        },
        {
          title: '操作' ,
          type: 'action',
          attrs:{
            width: 260
          },
          buttons: [
            {
              is: 'el-button' ,
              title: '跟踪游资',
              attrs: {
                type: 'text'
              },
              click:()=>{
                this.toTrade('hotMoneyTable' , "second")
              }
            },
            {
              is: 'el-button' ,
              title: '跟踪主力',
              attrs: {
                type: 'text'
              },
              click:()=>{
                this.toTrade('capitalFlowTable' , "third")
              }
            },
            {
              is: 'el-button' ,
              title: '历史涨停',
              attrs: {
                type: 'text'
              },
              click:()=>{
                this.toTrade('ztStockTable' , "liShi")
              }
            },
            {
              is: 'el-button' ,
              title: '交易明细',
              attrs: {
                type: 'text'
              },
              click:()=>{
                this.toTrade('trDetailsTable' , "trDetails")
              }
            },
          ]
        }
      ],
      ztStockColumns:[
        {
          "title": "交易日期",
          "key": "tradeDate"
        },
        {
          "title": "所属行业",
          "key": "industry"
        },
        {
          "title": "股票名称",
          "key": "name"
        },
        {
          key: 'showPrice' ,
          title: '股票价格',
          tableIs: "ShowGpPrice"
        },
        {
          "title": "成交额",
          "key": "amount"
        },
        {
          "title": "换手率",
          "key": "turnoverRatio"
        },
        {
          "title": "炸板次数",
          "key": "openTimes"
        },
        {
          "title": "涨停统计",
          "key": "upStat"
        },
        {
          "title": "连板数",
          "key": "limitTimes"
        },
        {
          "title": "D跌停U涨停Z炸板",
          "key": "limit"
        },
        {
          "title": "封单金额",
          "key": "fdAmount"
        },
        {
          "title": "板上成交金额",
          "key": "limitAmount"
        },
        {
          "title": "首次封板时间",
          "key": "firstTime"
        },
        {
          "title": "最后封板时间",
          "key": "lastTime"
        },
        {
          title: '操作' ,
          type: 'action',
          attrs:{
            width: 230
          },
          buttons: [
            {
              is: 'el-button' ,
              title: '跟踪游资',
              attrs: {
                type: 'text'
              },
              click:()=>{
                this.toTrade('hotMoneyTable' , "second")
              }
            },
            {
              is: 'el-button' ,
              title: '跟踪主力',
              attrs: {
                type: 'text'
              },
              click:()=>{
                this.toTrade('capitalFlowTable' , "third")
              }
            }
          ]
        }
      ] ,
      trDetailsColumns: [
        {
          "title": "交易日期",
          "key": "tradeDate",
          search: true,
          is: "el-date-picker" ,
          attrs:{
            width: 100 ,
            "value-format":"yyyy-MM-dd"
          }
        },
        {
          "title": "股票名称",
          "key": "name" ,
          op: 'LIKE',
          search: true
        },
        {
          key: 'showPrice' ,
          title: '股票价格',
          tableIs: "ShowGpPrice"
        },
        {
          "title": "涨跌幅",
          "key": "pctChg" ,
          tableIs: "NumberColumn",
        },
        {
          "title": "成交额",
          "key": "amount",
          tableIs: "BigNumberColumn",
          unit: '千',
        },
        {
          "title": "成交量",
          "key": "vol",
          tableIs: "TurnoverNumberColumn"
        },
        {
          key: 'turnoverRate' ,
          title: '换手率',
        },
        {
          key: 'volumeRatio' ,
          title: '量比',
        },
        {
          key: 'zdfNumStr' ,
          title: '涨/跌><3%'
        },
        {
          key: 'zdNumStr' ,
          title: '涨/跌'
        },
        {
          key: 'hotAmount' ,
          title: '游资成交额',
          tableIs: "BigNumberColumn",
        },
        {
          key: 'bigAmount' ,
          title: '大单成交额',
          tableIs: "BigNumberColumn",
          unit: '万'
        },
        {
          key: 'smallAmount' ,
          title: '小单成交额',
          tableIs: "BigNumberColumn",
          unit: '万'
        },
        {
          title: '操作' ,
          type: 'action',
          attrs:{
            width: 230
          },
          buttons: [
            {
              is: 'el-button' ,
              title: '跟踪游资',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.currRow = row
                this.tsCodes = [row.tsCode]
                this.toTrade('hotMoneyTable' , "second")
              }
            },
            {
              is: 'el-button' ,
              title: '跟踪主力',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.currRow = row
                this.tsCodes = [row.tsCode]
                this.toTrade('capitalFlowTable' , "third")
              }
            }
          ]
        }
      ] ,
      goodColumns:[
        {
          key: 'tradeDate' ,
          title: '交易日期' ,
          search: true ,
          is: "el-date-picker" ,
          attrs:{
            width: 100 ,
            "value-format":"yyyy-MM-dd"
          }

        },
        {
          key: 'industry' ,
          title: '行业' ,
          search: true ,
          op: 'LIKE',
          attrs:{
            width: 140
          }
        },
        {
          key: 'name' ,
          title: '股票名称' ,
          search: true ,
          op: 'LIKE',
          attrs:{
            width: 120
          }
        },
        {
          key: 'showPrice' ,
          title: '股票价格',
          tableIs: "ShowGpPrice"
        },
        {
          key: 'pctChgSum' ,
          title: '涨跌幅汇总' ,
          tableIs: "NumberColumn" ,
          attrs:{
            width: 120
          }
        },
        {
          key: 'turnoverRate' ,
          title: '换手率',
        },
        {
          key: 'volumeRatio' ,
          title: '量比',
        },
        {
          key: 'hotAmount' ,
          title: '游资成交额',
          tableIs: "BigNumberColumn",
        },
        {
          key: 'bigAmount' ,
          title: '大单成交额',
          tableIs: "BigNumberColumn",
          unit: '万'
        },
        {
          key: 'smallAmount' ,
          title: '小单成交额',
          tableIs: "BigNumberColumn",
          unit: '万'
        },

        {
          title: '操作' ,
          type: 'action',
          attrs:{
            width: 290
          },
          buttons: [
            {
              is: 'el-button' ,
              title: '跟踪游资',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.activeName = "second" ;
                this.currRow = row
                this.tsCodes = [row.tsCode]
                this.$nextTick(()=>{
                  this.$refs.hotMoneyTable.handlerQueryListByPage(
                      [
                        {
                          key: 'tsCode' ,
                          op: 'EQ',
                          value: row.tsCode
                        },
                        {
                          key: 'tradeDate' ,
                          op: 'EQ',
                          value: this.tradeDateCode
                        }
                      ]
                  )
                })
              }
            },
            {
              is: 'el-button' ,
              title: '跟踪主力',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.activeName = "third" ;
                this.currRow = row
                this.tsCodes = [row.tsCode]
                this.$nextTick(()=>{
                  this.$refs.capitalFlowTable.handlerQueryListByPage(
                      [
                        {
                          key: 'tsCode' ,
                          op: 'EQ',
                          value: row.tsCode
                        },
                        {
                          key: 'tradeDate' ,
                          op: 'EQ',
                          value: this.tradeDateCode
                        }
                      ]
                  )
                })
              }
            },
            {
              is: 'el-button' ,
              title: '竞价',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.activeName = "jingJia" ;
                this.currRow = row
                this.tsCodes = [row.tsCode]
                this.$nextTick(()=>{
                  this.$refs.stockBiddingTable.handlerQueryListByPage(
                      [
                        {
                          key: 'tsCode' ,
                          op: 'EQ',
                          value: row.tsCode
                        },
                        {
                          key: 'tradeDate' ,
                          op: 'EQ',
                          value: this.tradeDateCode
                        }
                      ]
                  )
                })
              }
            },
            {
              is: 'el-button' ,
              title: '历史涨停',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.currRow = row
                this.activeName = "liShi" ;
                this.tsCodes = [row.tsCode]
                this.$nextTick(()=>{
                  this.$refs.ztStockTable.handlerQueryListByPage(
                      [
                        {
                          key: 'tsCode' ,
                          op: 'EQ',
                          value: row.tsCode
                        }
                      ]
                  )
                })
              }
            },
            {
              is: 'el-button' ,
              title: '交易明细',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.activeName = "trDetails" ;
                this.currRow = row
                this.tsCodes = [row.tsCode]
                this.$nextTick(()=>{
                  this.$refs.trDetailsTable.handlerQueryListByPage(
                      [
                        {
                          key: 'tsCode' ,
                          op: 'EQ',
                          value: row.tsCode
                        }
                      ]
                  )
                })
              }
            },
          ]
        }
      ],
      highestColumns:[
        {
          key: 'tradeDate' ,
          title: '交易日期' ,
          search: true ,
          is: "el-date-picker" ,
          attrs:{
            width: 100 ,
            "value-format":"yyyy-MM-dd"
          }

        },
        {
          key: 'industry' ,
          title: '行业' ,
          search: true ,
          op: 'LIKE',
          attrs:{
            width: 100
          }
        },
        {
          key: 'name' ,
          title: '股票名称' ,
          search: true ,
          op: 'LIKE',
          attrs:{
            width: 110
          }
        },

        {
          key: 'showPrice' ,
          title: '股票价格',
          tableIs: "ShowGpPrice"
        },
        {
          key: 'zdfNumStr' ,
          title: '涨/跌><3%'
        },
        {
          key: 'zdNumStr' ,
          title: '涨/跌'
        },
        {
          key: 'pctChgSum' ,
          title: '涨跌幅汇总' ,
          tableIs: "NumberColumn" ,
          attrs:{
            width: 120
          }
        },
        {
          key: 'turnoverRate' ,
          title: '换手率',
        },
        {
          key: 'volumeRatio' ,
          title: '量比',
        },
        {
          key: 'hotAmount' ,
          title: '游资成交额',
          tableIs: "BigNumberColumn",
        },
        {
          key: 'bigAmount' ,
          title: '大单成交额',
          tableIs: "BigNumberColumn",
          unit: '万'
        },
        {
          key: 'smallAmount' ,
          title: '小单成交额',
          tableIs: "BigNumberColumn",
          unit: '万'
        },

        {
          title: '操作' ,
          type: 'action',
          attrs:{
            width: 290
          },
          buttons: [
            {
              is: 'el-button' ,
              title: '跟踪游资',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.activeName = "second" ;
                this.currRow = row
                this.tsCodes = [row.tsCode]
                this.$nextTick(()=>{
                  this.$refs.hotMoneyTable.handlerQueryListByPage(
                      [
                        {
                          key: 'tsCode' ,
                          op: 'EQ',
                          value: row.tsCode
                        },
                        {
                          key: 'tradeDate' ,
                          op: 'EQ',
                          value: this.tradeDateCode
                        }
                      ]
                  )
                })
              }
            },
            {
              is: 'el-button' ,
              title: '跟踪主力',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.activeName = "third" ;
                this.currRow = row
                this.tsCodes = [row.tsCode]
                this.$nextTick(()=>{
                  this.$refs.capitalFlowTable.handlerQueryListByPage(
                      [
                        {
                          key: 'tsCode' ,
                          op: 'EQ',
                          value: row.tsCode
                        },
                        {
                          key: 'tradeDate' ,
                          op: 'EQ',
                          value: this.tradeDateCode
                        }
                      ]
                  )
                })
              }
            },
            {
              is: 'el-button' ,
              title: '竞价',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.activeName = "jingJia" ;
                this.currRow = row
                this.tsCodes = [row.tsCode]
                this.$nextTick(()=>{
                  this.$refs.stockBiddingTable.handlerQueryListByPage(
                      [
                        {
                          key: 'tsCode' ,
                          op: 'EQ',
                          value: row.tsCode
                        },
                        {
                          key: 'tradeDate' ,
                          op: 'EQ',
                          value: this.tradeDateCode
                        }
                      ]
                  )
                })
              }
            },
            {
              is: 'el-button' ,
              title: '历史涨停',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.currRow = row
                this.activeName = "liShi" ;
                this.tsCodes = [row.tsCode]
                this.$nextTick(()=>{
                  this.$refs.ztStockTable.handlerQueryListByPage(
                      [
                        {
                          key: 'tsCode' ,
                          op: 'EQ',
                          value: row.tsCode
                        }
                      ]
                  )
                })
              }
            },
            {
              is: 'el-button' ,
              title: '交易明细',
              attrs: {
                type: 'text'
              },
              click:(row)=>{
                this.activeName = "trDetails" ;
                this.currRow = row
                this.tsCodes = [row.tsCode]
                this.$nextTick(()=>{
                  this.$refs.trDetailsTable.handlerQueryListByPage(
                      [
                        {
                          key: 'tsCode' ,
                          op: 'EQ',
                          value: row.tsCode
                        }
                      ]
                  )
                })
              }
            },
          ]
        }
      ] ,
      XGColumns:[
        {
          key: 'industry' ,
          title: '行业' ,
          search: true ,
          op: 'LIKE',
          attrs:{
            width: 110
          }
        },
        {
          key: 'name' ,
          title: '股票名称' ,
          search: true ,
          op: 'LIKE',
          attrs:{
            width: 120
          }
        },
        {
          key: 'tradeDate' ,
          title: '交易日期' ,
          search: true ,
          is: "el-date-picker" ,
          attrs:{
            width: 100 ,
            "value-format":"yyyy-MM-dd"
          }

        },
        {
          key: 'pctChg' ,
          title: '连续3天涨幅',
        },
        {
          key: 'showPrice' ,
          title: '股票价格',
          tableIs: "ShowGpPrice"
        },
      ]
    }
  },
  created() {
    this.getNewTradeDate()
  },
  methods:{
    toTrade(tableId , to){
      this.activeName = to ;
      let row = this.currRow
      this.$nextTick(()=>{
        this.$refs[tableId].handlerQueryListByPage(
            [
              {
                key: 'tsCode' ,
                op: 'EQ',
                value: row.tsCode
              },
              {
                key: 'tradeDate' ,
                op: 'EQ',
                value: this.tradeDateCode
              }
            ]
        )
      })
    },
    getNewTradeDate(){
      http.post("/xcdhTrading/stock-info/newTradeDate").then(res=>{
        this.formData.tradeDate = res.data.tradeDate
        this.tradeDateCode = res.data.tradeDateCode
      })
    },
    handleClick(){

    },
    getHotMoneyParam(){
      return [
        {
          key: 'tsCode' ,
          op: 'IN',
          value: this.tsCodes
        }
      ]
    },
    lookHotMoney(){
      let data = this.$refs.gpBaseTable.getSelectionData() ;
      if(data.length === 0){
        this.$message.error('请选择数据');
        return
      }
      this.tsCodes = data.map(item=>item.tsCode)
      this.activeName = "second" ;
      this.$nextTick(()=>{
        this.$refs.hotMoneyTable.queryListByPage()
      })
    },
    lookZhuLi(){
      let data = this.$refs.gpBaseTable.getSelectionData() ;
      if(data.length === 0){
        this.$message.error('请选择数据');
        return
      }
      this.tsCodes = data.map(item=>item.tsCode)
      this.activeName = "third" ;
      this.$nextTick(()=>{
        this.$refs.capitalFlowTable.queryListByPage()
      })
    },
    params(){
      return [
        {
          key: "limit" ,
          op: 'EQ',
          value: 'U'
        }
      ]
    },
    goodParams(){
      return [
        {
          key: "pctChgSum" ,
          op: 'DESC',
          value: 'D'
        }
      ]
    },
    highestParams(){
      return [
        {
          key: "tradeDate" ,
          op: 'DESC',
        },
        {
          key: "zdfRatio" ,
          op: 'DESC',
        },
        {
          key: "zfNum" ,
          op: 'DESC',
        },

        {
          key: "dfNum" ,
          op: 'ASC',
        },
        {
          key: "zdRatio" ,
          op: 'DESC',
        }
      ]
    },
    lDParams(){
      return [
        {
          key: "limit" ,
          op: 'EQ',
          value: 'D'
        }
      ]
    }
  }
}
</script>

<style scoped>

</style>
